#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt

BLUE = [255,0,0]
img1 = cv.imread('opencv_logo.png')
print(1)
replicate = cv.copyMakeBorder(img1,10,10,10,10,cv.BORDER_REPLICATE)
print(2)
reflect = cv.copyMakeBorder(img1,10,10,10,10,cv.BORDER_REFLECT)
print(3)
reflect101 = cv.copyMakeBorder(img1,10,10,10,10,cv.BORDER_REFLECT_101)
print(4)
wrap = cv.copyMakeBorder(img1,10,10,10,10,cv.BORDER_WRAP)
print(5)
constant= cv.copyMakeBorder(img1,10,10,10,10,cv.BORDER_CONSTANT,value=BLUE)
print(6)
plt.subplot(231),plt.imshow(img1,'gray'),plt.title('ORIGINAL')
print(7)
plt.subplot(232),plt.imshow(replicate,'gray'),plt.title('REPLICATE')
print(8)
plt.subplot(233),plt.imshow(reflect,'gray'),plt.title('REFLECT')
print(9)
plt.subplot(234),plt.imshow(reflect101,'gray'),plt.title('REFLECT_101')
print(10)
plt.subplot(235),plt.imshow(wrap,'gray'),plt.title('WRAP')
print(11)
plt.subplot(236),plt.imshow(constant,'gray'),plt.title('CONSTANT')
print(12)
plt.show()

